import React from 'react';
import { Button } from 'antd';
import Cookies from 'js-cookie';
import { router, Link } from 'umi';
import { initGlobalState, MicroAppStateActions } from 'qiankun';

class User extends React.Component {
  constructor(props) {
    super(props);
    console.log(props);
  }

  state = {
    microAppLoading: false,
  };

  // Initialize state
  actions: MicroAppStateActions = initGlobalState(this.state);

  componentDidMount() {
    console.log('User----componentDidMount');
    this.actions.setGlobalState(this.state);
  }

  render() {
    return (
      <div>
        用户管理
        <ul>
          <li>
            <Link to="/3333/comments">/3333/comments</Link>
          </li>
          <li>
            <Link to="/workplace">workplace</Link>
          </li>
        </ul>
      </div>
    );
  }
}

export default User;
